W11. Positive Definite Optimization
1. Theory
1.1 Introduction and Motivation
In one dimension, the question “is this number positive?” has a clear answer:
Positive definite matrices appear throughout applied mathematics and engineering:
- Geometry: The Hessian of a strictly convex function is positive definite; its level sets are ellipsoids.
- Optimization: A critical point where the Hessian is positive definite is guaranteed to be a local minimum.
- Statistics: Covariance matrices are positive semi-definite; valid correlation structures require this.
- Numerical methods: Cholesky factorization — a fast, numerically stable solver — exists exactly when the matrix is positive definite.
- Machine learning: Kernel matrices must be positive semi-definite for the theory to be well-posed.
This article builds the complete theory from definition to application, covering the eigenvalue test, Sylvester’s criterion, the Cholesky decomposition, the geometry of quadratic forms, optimization via the Hessian, convexity, and the extension to complex Hermitian matrices.
1.2 Positive Definite and Positive Semi-Definite Matrices
Definition (Positive Definite, PD): A symmetric matrix
We write
Definition (Positive Semi-Definite, PSD): A symmetric matrix
We write
Two further cases arise in practice. A symmetric matrix is negative definite (ND) if
The expression
1.2.1 Simple Examples
A diagonal matrix
- A diagonal matrix is PD iff all diagonal entries are positive.
- It is PSD iff all diagonal entries are nonnegative.
For a
For this to be positive for all
1.3 Quadratic Forms
1.3.1 Definition and Matrix Representation
A quadratic form in
Every quadratic form can be written as
Rule for reading off
(coefficient of ), (half the coefficient of ).
Example:
Symmetry matters because it gives:
- a unique matrix representation,
- real eigenvalues (Spectral Theorem),
- a direct connection between the sign of
and the eigenvalues of .
1.3.2 Diagonalizing Quadratic Forms
The Spectral Theorem states that every real symmetric matrix has an orthogonal eigendecomposition
The quadratic form becomes a pure sum of squares in the new coordinates. Since
This equivalence is the foundation of the eigenvalue test.
1.4 Equivalent Conditions for Positive Definiteness
For a symmetric matrix
- Definition:
for all . - Eigenvalue test: All eigenvalues
. - Sylvester’s criterion: All leading principal minors are positive, i.e.
for , where is the top-left submatrix of . - Cholesky factorization: There exists an invertible lower-triangular matrix
with positive diagonal such that .
Each condition provides a different computational pathway.
1.4.1 Eigenvalue Test
The eigenvalue test follows from the diagonalization argument in Section 1.3.2. It is the most conceptually transparent but computationally expensive for large matrices (finding eigenvalues requires solving the characteristic polynomial).
For symmetric PSD: All eigenvalues
1.4.2 Sylvester’s Criterion
The leading principal minor of order
For a
Important note on PSD: For positive semi-definiteness, Sylvester’s criterion does not simply become
1.4.3 Checking Definiteness at a Glance
A quick workflow for a
| Condition | Classification |
|---|---|
| Positive definite | |
| Negative definite | |
| Indefinite | |
| Positive or negative semi-definite (check sign of trace) |
1.5 The Cholesky Decomposition
Theorem (Cholesky): A symmetric matrix
The factorization
Why it implies PD: For any
LDL^T factorization: A closely related form is
The pivots
1.6 Geometric Shapes of Quadratic Forms
The definiteness of
| Classification | Eigenvalue signs | Shape of |
Critical point |
|---|---|---|---|
| Positive definite | All |
Elliptic paraboloid (bowl) | Unique global minimum |
| Positive semi-definite | All |
Parabolic cylinder (trough) | Minimum along a line |
| Indefinite | Mixed signs | Hyperbolic paraboloid (saddle) | Saddle point |
| Negative definite | All |
Inverted paraboloid | Unique global maximum |
The level sets
- Ellipses (or ellipsoids) when
, - Parallel lines (or hyperplanes) when
is PSD with a zero eigenvalue, - Hyperbolas when
is indefinite.
These shapes explain why a PD Hessian at a critical point signals a minimum.
1.7 Optimization: The Hessian and Critical Points
Consider a twice-differentiable function
- A point
is a critical point if . - The Hessian matrix
is the symmetric matrix of second partial derivatives: .
Second Derivative Test (multi-variable):
| Condition on |
Nature of |
|---|---|
| Strict local minimum | |
| Strict local maximum | |
| Saddle point | |
| Test inconclusive |
The intuition: the quadratic approximation
Standard procedure:
- Compute
and solve to find all critical points. - Compute
at each critical point. - Apply the eigenvalue test or Sylvester’s criterion to classify
.
1.8 Convexity
Definition (Convex function):
If the inequality is strict for
Hessian criterion for convexity: For a twice-differentiable function
is convex for all , is strictly convex for all (the converse is not quite true in general, but this sufficient condition is what we use).
Why convexity matters: For a convex function, every local minimum is automatically a global minimum. This is the cornerstone of convex optimization, which underpins machine learning, signal processing, and operations research.
1.9 Hermitian Positive Definite Matrices
For complex matrices, the role of symmetric matrices is played by Hermitian matrices:
Definition (HPD): A Hermitian matrix
Definition (HPSD):
Exactly the same equivalences hold as in the real case:
| Condition | Equivalent statement |
|---|---|
| All eigenvalues of |
|
| All leading principal minors of |
|
| All eigenvalues of |
|
Note that the eigenvalues of a Hermitian matrix are always real (a consequence of the Spectral Theorem for Hermitian matrices), so the condition “eigenvalues are positive” is non-vacuous over
Construction via
Key warning: Positivity is only defined for Hermitian matrices over
2. Definitions
- Positive definite (PD) matrix: A symmetric matrix
such that for all nonzero . - Positive semi-definite (PSD) matrix: A symmetric matrix
such that for all . - Negative definite (ND) matrix: A symmetric matrix
such that for all nonzero (equivalently, is PD). - Indefinite matrix: A symmetric matrix that is neither PD, PSD, ND, nor NSD; equivalently,
takes both positive and negative values. - Quadratic form: A homogeneous polynomial of degree 2 in
variables, written as with symmetric. - Leading principal minor of order
: The determinant of the top-left submatrix of , denoted . - Sylvester’s criterion:
for all . - Cholesky decomposition: The factorization
(real) or (complex), where is lower-triangular with positive diagonal entries; exists and is unique when . - LDL
factorization: The factorization where is unit lower-triangular and is diagonal; the diagonal entries of (pivots) are positive iff . - Critical point: A point
where . - Hessian matrix: The
symmetric matrix of second partial derivatives of , denoted ; governs local curvature. - Convex function: A function
such that for all and . - Hermitian matrix: A complex matrix satisfying
(conjugate transpose equals itself). - Hermitian positive definite (HPD): A Hermitian matrix
with for all nonzero complex . - Hermitian positive semi-definite (HPSD): A Hermitian matrix
with for all complex .
3. Formulas
- Quadratic form in matrix notation:
, where is symmetric. - Symmetric matrix from quadratic form: $A_{ii} = $ coefficient of
; for . - Diagonalized quadratic form:
where and is the orthogonal matrix of eigenvectors. - Completing the square (
): . - Sylvester’s criterion (
): and . - Cholesky decomposition:
(real); (complex Hermitian). - LDL
factorization and quadratic form: where and are the pivots. - Eigenvalue product formula:
. - Second derivative test (classification): at a critical point
, local min; local max; indefinite saddle. - Hessian convexity criterion:
convex for all . - Determinant of HPD matrix:
(all ).
4. Practice
4.1 Design a Non-Positive-Definite Symmetric Matrix (Lab 9, Task 1)
Given a symmetric matrix
Click to see the solution
Key Concept: For a
We need
Construction: Take
- Check
: . ✓ - Compute
.
So
Why does this work? The condition
4.2 Prove is SPD When is SPD (Lab 9, Task 2)
If
Click to see the solution
Step 1: Show
Since
So
Step 2: Show
Since
The eigenvalues of
Therefore all eigenvalues of
Conclusion:
4.3 Matrix of a Quadratic Form and LDL Factorization (Lab 9, Task 3)
The quadratic form
Click to see the solution
Step 1: Expand the quadratic form and read off
The coefficient of
Step 2: Compute
We eliminate the
- Pivot 1:
. - New
entry (Schur complement): .
Therefore:
Verification:
Step 3: Identify the substitution.
Set
Then
The pivots
4.4 Test for Minimum via Hessian (Lab 9, Task 4)
Determine whether
Click to see the solution
Step 1: Verify
At
Step 2: Compute the Hessian at
At
Step 3: Classify using Sylvester’s criterion.
, but .
Since
Conclusion:
4.5 Find and Classify All Critical Points (Lab 9, Task 5)
Find and classify all critical points of
Click to see the solution
Step 1: Find critical points.
Since the
Step 2: Compute the Hessian.
This is a diagonal Hessian, so definiteness is determined directly by the signs of the diagonal entries.
Step 3: Classify each critical point.
| Point | Classification | |||
|---|---|---|---|---|
| Local minimum | ||||
| Saddle point | ||||
| Saddle point | ||||
| Local maximum |
Summary: The function has one local minimum at
4.6 Apply Sylvester’s Criterion to Classify Four Matrices (Lab 9, Task 6)
Given:
Determine which matrix is positive definite (without computing eigenvalues). Then find
Click to see the solution
Apply Sylvester’s criterion to each
Finding
Since
Try
4.7 Matrix, Pivots, Rank, Eigenvalues, and Determinant of a Degenerate Form (Lab 9, Task 7)
For the quadratic form
Click to see the solution
Step 1: Write
Let
Step 2: Rank.
All rows of
Step 3: Eigenvalues.
For a rank-1 matrix
(corresponding eigenvector ), (the two-dimensional null space is perpendicular to ).
Step 4: Pivots.
Performing row reduction on
Step 5: Determinant.
This is consistent with rank 1: a singular matrix has determinant 0.
4.8 Check Convexity via Hessian (Lab 9, Task 8)
Check the convexity of
Click to see the solution
Key Concept: A twice-differentiable function is convex iff its Hessian is positive semi-definite everywhere. Since
Compute the Hessian:
Check positive definiteness using Sylvester’s criterion:
. ✓ . ✓
Since
4.9 Check Hermitian Positive Definiteness (Lab 9, Task 9)
Determine whether
Click to see the solution
Step 1: Verify
We need
The diagonal entries are real:
So
Step 2: Apply Sylvester’s criterion.
For a
. ✓ . ✓
(Note:
Conclusion:
4.10 Classify Five Matrices (Assignment 9, Task 1)
Determine whether each of the following matrices is positive definite, positive semi-definite, or neither.
, (b) , (c) , (d) , (e) .
Click to see the solution
Key tool: For each symmetric
(a)
Diagonal matrix with entries
(b)
(c)
Diagonal with entries
(d)
(e)
Diagonal with entries
4.11 Find All That Make a Matrix Positive Definite (Assignment 9, Task 2)
For what values of
Click to see the solution
Apply Sylvester’s criterion:
. ✓ (satisfied for all ). .
Conclusion:
4.12 Find All That Make a Matrix Positive Definite (Assignment 9, Task 3)
For what values of
Click to see the solution
Apply Sylvester’s criterion:
. or .
Combining both conditions (we need
Conclusion:
4.13 Sylvester’s Criterion for a Matrix (Assignment 9, Task 4)
Use Sylvester’s criterion to determine whether
Click to see the solution
Compute the three leading principal minors.
All three leading principal minors are positive. By Sylvester’s criterion,
4.14 Eigenvalues and Definiteness of a Matrix (Assignment 9, Task 5)
Find the eigenvalues of
Click to see the solution
Step 1: Find the characteristic polynomial.
Step 2: Solve using the quadratic formula.
So
Step 3: Apply the eigenvalue test.
Both eigenvalues are positive (since
Conclusion:
4.15 Symmetric Matrix of a Quadratic Form in Three Variables (Assignment 9, Task 6)
Consider
- Write
as with symmetric. - Determine whether
is positive definite.
Click to see the solution
(a) Reading off the symmetric matrix.
| Term | Coefficient | Matrix entry |
|---|---|---|
(b) Sylvester’s criterion.
. ✓ . ✓ . Expand along the first row:
All three leading principal minors are positive, so
4.16 Complete the Square to Verify Positive Definiteness (Assignment 9, Task 7)
For
- Write the associated symmetric matrix.
- Complete the square to express
as a sum of squares. - Determine whether
is positive definite.
Click to see the solution
(a) Symmetric matrix.
The coefficient of
(b) Complete the square.
Factor out 2 from the
So
(c) Positive definiteness.
Both coefficients (
- If
: the second term , so . - If
and : the first term , so .
Therefore
4.17 Prove Sylvester’s Criterion for Matrices (Assignment 9, Task 8)
Let
Click to see the solution
We prove both directions.
(
- Take
: . So . - Since
, the quadratic with satisfies for all real . A quadratic with that is positive everywhere has negative discriminant: , i.e. , i.e. .
(
Complete the square:
Both coefficients are positive (
- If
: the second term , so . - If
, : the first term , so .
Thus
4.18 Find and Classify a Critical Point (Assignment 9, Task 9)
Find and classify the critical points of
Click to see the solution
Step 1: Solve
From (1):
Critical point:
Step 2: Compute and classify the Hessian.
, .
4.19 Analyze Critical Points of a Quadratic Function (Assignment 9, Task 10)
For
- Find all critical points.
- Compute the Hessian matrix.
- Classify the critical point.
Click to see the solution
(a) Find critical points.
Substitute:
Critical point:
(b) Hessian.
(c) Classification.
, .
4.20 Find and Classify Critical Points of a Cubic Function (Assignment 9, Task 11)
Find and classify all critical points of
Click to see the solution
This is identical to Lab 9, Task 5. See the solution in 4.5 above for the complete derivation.
Summary of results:
| Critical Point | Classification |
|---|---|
| Local minimum | |
| Saddle point | |
| Saddle point | |
| Local maximum |
4.21 Degenerate Critical Point Analysis (Assignment 9, Task 12)
Consider
- Compute the Hessian at
. - Use the Hessian to analyze the nature of
. - Is
actually a local minimum? Justify.
Click to see the solution
First, verify
(a) Hessian at
At
(b) Analysis via Hessian.
(c) Is
Evaluate
At
Therefore
4.22 Prove Convexity of an Exponential Function (Assignment 9, Task 13)
Show that
Click to see the solution
Strategy: Show that the Hessian
Step 1: Compute the Hessian.
Let
Step 2: Check positive semi-definiteness of
Since
always. always.
By Sylvester’s criterion,
Conclusion:
4.23 Determine Convexity of a Quadratic Function (Assignment 9, Task 14)
Determine whether
Click to see the solution
This is identical to Lab 9, Task 8. See the solution in 4.8 above.
Conclusion:
4.24 Prove Convexity Iff Hessian Is PSD (Assignment 9, Task 15)
Let
Click to see the solution
Step 1: Compute the Hessian of
The gradient is
Step 2: Apply the Hessian convexity criterion.
A twice-differentiable function is convex if and only if its Hessian is positive semi-definite at every point. Since
Remark: If
4.25 Maximize a Profit Function (Assignment 9, Task 16)
A company’s profit is
- Find the production levels
that maximize profit. - Verify this is a maximum.
Click to see the solution
(a) Find the critical point.
From (1):
Critical point:
(b) Verify it is a maximum.
. .
Since
4.26 Prove for SPD Matrices (Assignment 9, Task 17)
Let
Click to see the solution
Since
Since
The determinant of a matrix equals the product of its eigenvalues:
Since each
4.27 Prove Positive-Definite Inequality from Eigenvalue Condition (Assignment 9, Task 18)
Suppose
Click to see the solution
Since
Step 1: Change coordinates. Let
Step 2: Expand the quadratic form.
Step 3: Bound from below. Since
4.28 Prove the Sum of Two PD Matrices Is PD (Assignment 9, Task 19)
Let
Click to see the solution
We need to show
Expand:
Since
Since
Therefore, for any
Symmetry:
Hence
4.29 Classify a General Quadratic Function (Assignment 9, Task 20)
Consider
- Find the condition on
for to have a local minimum at . - Find the condition for
to be a local maximum. - Find the condition for
to be a saddle point.
Click to see the solution
Identify the Hessian. Since
Equivalently, the classification of
(a) Local minimum:
Since
(b) Local maximum:
(c) Saddle point:
4.30 Verify Positive Definiteness by Direct Computation (Lecture 9, Example 1)
Let
Click to see the solution
Take any nonzero vector
Since
Conclusion:
4.31 Diagonalize a Quadratic Form and Verify Positivity (Lecture 9, Example 2)
For
Click to see the solution
Step 1: Write the symmetric matrix.
Step 2: Find eigenvalues.
Eigenvalues:
Step 3: Eigenvalue test.
Both eigenvalues are positive, so
Step 4: Diagonal form.
After the orthogonal change of variables
This is manifestly a sum of positive terms, confirming the quadratic form is always positive.
4.32 Full Optimization Workflow (Lecture 9, Example 3)
Let
Click to see the solution
Step 1: Compute the gradient and solve
Subtract (2) from (1):
Critical point:
Step 2: Compute the Hessian.
Step 3: Apply Sylvester’s criterion.
, .
Minimum value:
4.33 Cholesky Factorization (Lecture 9, Example 4)
Compute the Cholesky decomposition
Click to see the solution
Step 1: Verify
Step 2: Find
Expand
: (positive diagonal required). : . : .
Verification:
4.34. Compute the Singular Value Decomposition (Test II Recap, Task 1)
Find the Singular Value Decomposition
Click to see the solution
Key Concept: To find the SVD of an
Step 1: Compute
Step 2: Find the eigenvalues.
For
For
The nonzero eigenvalues of
Step 3: Compute singular values.
Order from largest to smallest:
Step 4: Construct
Step 5: Find eigenvectors of
Since
Step 6: Find eigenvectors of
Since
Step 7: Verify
Answer:
4.35. Find Rank, Singular Values, and Fundamental Subspace Dimensions (Test II Recap, Task 2)
For the matrix
Click to see the solution
Key Concept: The rank equals the number of nonzero singular values. For an
Here
Step 1: Compute
Step 2: Find eigenvalues of
Numerically:
Both eigenvalues are strictly positive, so both are nonzero.
Step 3: Compute singular values.
Step 4: Determine rank.
The number of nonzero singular values equals the rank:
Step 5: Dimensions of the four fundamental subspaces.
Using the rank-nullity theorem and the SVD structure:
| Subspace | Formula | Value |
|---|---|---|
Verification via rank-nullity:
Answer:
4.36. State Theoretical Properties of SVD (Test II Recap, Task 3)
Let
(a) How many nonzero singular values does
(b) What is the relationship between the eigenvalue spectra of
(c) What are the dimensions of the matrix
Click to see the solution
Key Concept: The SVD exists for every real matrix. Its theoretical properties connect the rank, eigenvalue spectra, and subspace dimensions of a matrix.
(a) Number of nonzero singular values.
The singular values of
This follows because
(b) Relationship between spectra of
More generally, the nonzero parts of their spectra are identical regardless of which is larger:
This is why computing SVD from the smaller of the two matrices (
(c) Dimensions of
In the full SVD
It has the
Answer: (a) exactly
4.37. Prove Positive Definiteness via Sylvester’s Criterion (Test II Recap, Task 4)
Prove that the matrix
Click to see the solution
Key Concept: A symmetric matrix is positive definite if and only if all its leading principal minors are strictly positive (Sylvester’s criterion). The
Step 1:
Step 2:
Step 3:
Expand along the third row:
where the cofactors are:
Therefore:
Conclusion.
All three leading principal minors are strictly positive:
By Sylvester’s criterion,
4.38. Analyze a Quadratic Form (Test II Recap, Task 5)
Let
(a) Write
(b) Express
(c) Determine whether
Click to see the solution
Key Concept: Every quadratic form
(a) Matrix representation.
The coefficient of
(b) Sum of squares by completing the square.
Group the terms involving
Since
(c) Definiteness via Sylvester’s criterion.
Compute the leading principal minors of
, .
Both minors are strictly positive, so
This is consistent with the sum-of-squares representation:
Answer:
4.39. Find Local Extrema of a Multivariable Function (Test II Recap, Task 6)
Find all local extrema of
Click to see the solution
Key Concept: A local extremum of a differentiable function occurs at a stationary (critical) point where
Step 1: Find the gradient and solve
From (1):
Substitute into (2):
Then
Critical point:
Step 2: Compute the Hessian.
The Hessian is the matrix of second-order partial derivatives:
Note that the Hessian is constant (the function is a polynomial of degree 2), so it is the same at every point.
Step 3: Classify the critical point using Sylvester’s criterion.
, .
Since all leading principal minors are strictly positive,
Step 4: Identify the extremum type and value.
Because the Hessian is positive definite,
Answer:
4.40. Identify the Symmetric Matrix of a Quadratic Form and Classify Definiteness (Test II, Task 1)
Given the quadratic form:
(a) Write
(b) Determine whether
Click to see the solution
Key Concept: To build the symmetric matrix
(a) Reading off the symmetric matrix.
The coefficients of the squared terms give the diagonal entries directly:
For the cross terms:
- Coefficient of
is , so . - Coefficient of
is , so . - There is no
term, so .
Therefore:
(b) Sylvester’s criterion.
Compute the three leading principal minors:
. . . Expanding along the first row:
Since all three leading principal minors are strictly positive,
Answer:
4.41. Find Critical Points and Classify via the Hessian (Test II, Task 2)
Given the function:
(a) Find all critical points of
(b) Compute the Hessian matrix of
(c) For each critical point, determine its type (local minimum, local maximum, or saddle point).
Click to see the solution
Key Concept: Critical points of a differentiable function satisfy
(a) Finding the critical point.
Set both partial derivatives to zero:
Substitute
The only critical point is
(b) Hessian matrix.
The second partial derivatives are constant:
(c) Classification at
Apply Sylvester’s criterion to
, .
Since
Answer: Unique critical point
4.42. Compute the Full SVD and Scale It (Test II, Task 3)
Given the matrix:
(a) Find the singular values of
(b) Find the full SVD of
(c) Find the SVD of
Click to see the solution
Key Concept: The singular values of
(a) Singular values.
Compute
The eigenvalues of
(b) Full SVD.
Matrix
: eigenvector , so . : eigenvector , so .
Matrix
Matrix
Eigenvalues are
Verification:
(c) SVD of
Scaling
Answer:
4.43. Prove Properties of Positive Definite Matrices and Find the Definiteness Range (Test II, Task 4)
Assume
(a) Explain why
(b) Explain why
(c) For what values of
Click to see the solution
Key Concept: The definition of positive definiteness (
(a)
First,
For any nonzero vector
Since
(b)
A real symmetric matrix is positive definite if and only if all its eigenvalues are strictly positive (this follows from the Spectral Theorem). The determinant equals the product of all eigenvalues:
Since every
(c) Values of
Apply Sylvester’s criterion: all leading principal minors of
. ✓ (no condition on from this minor) . . Expanding along the third row (since the entry is 1 and the rest of its row/column are zero):
All three conditions reduce to the single requirement
Answer: